package com.lemzdo.community.service;

import com.lemzdo.community.dto.PostDTO;
import com.lemzdo.community.model.Post;

import java.util.List;

public interface PostService {
    int deleteByPrimaryKey(Integer id);

    int insert(Post record);

    int insertSelective(Post record);

    PostDTO selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Post record);

    int updateByPrimaryKey(Post record);

    List<PostDTO> selectAllPostDTO(String searchMsg);

    Integer count(String searchMsg);

    List<Post> selectAllByAuthorId(Integer id);

    Integer countByAuthorId(Integer id);

    void createOrUpdate(Post post);

    void increaseView(Integer id);

    void increaseComment(Integer id);

    List<Post> selectAllRelated(PostDTO postDTO);

    Post getPostById(Integer postId);


}
